package com.example.demo.util;

public class HashUtil {
    public static String cleanHash(String hash) {
        if (hash == null) {
            return hash;
        }
        if (hash.startsWith("0x")) {
            return hash.substring(2);
        }
        return hash;
    }

    public static String cleanHash(Object hash) {
        if (hash == null) {
            return null;
        }
        return cleanHash((String) hash);
    }
}
